// pages/carstore/index.js
Page({

  /**
   * 页面的初始数据a
   */
  data: {
	  activeIndex: -1,
	  serviceindex:0,
choose:["全部区域","全部服务","默认排序"],
store:[
	{ img:"/images/store1.png",name: "尼克斯品汽车管家", address:"新店镇 翔舞村宋坂77号之315号",distance:"12.3km",score:"4.8",sellnum:"4500",isfree:true},
	{ img: "/images/store1.png", name: "尼克斯品汽车管家", address: "新店镇 翔舞村宋坂77号之315号", distance: "12.3km", score: "4.8", sellnum: "4500", isfree: false },
	{ img: "/images/store1.png", name: "尼克斯品汽车管家", address: "新店镇 翔舞村宋坂77号之315号", distance: "12.3km", score: "4.8", sellnum: "4500", isfree: false },
	{ img: "/images/store1.png", name: "尼克斯品汽车管家", address: "新店镇 翔舞村宋坂77号之315号", distance: "12.3km", score: "4.8", sellnum: "4500", isfree: false },
	{ img: "/images/store1.png", name: "尼克斯品汽车管家", address: "新店镇 翔舞村宋坂77号之315号", distance: "12.3km", score: "4.8", sellnum: "4500", isfree: false },
	{ img: "/images/store1.png", name: "尼克斯品汽车管家", address: "新店镇 翔舞村宋坂77号之315号", distance: "12.3km", score: "4.8", sellnum: "4500", isfree: false }
],
	  servicemenu:[
		  {typename:"全部门店",content:["标准洗车","全车精洗","全车打蜡"]},
		  { typename: "美容门店", content: ["标准洗车", "全车精洗", "全车打蜡", "内饰清洗", "全车镀晶", "全车贴膜"] },
		  { typename: "轮胎门店", content: ["标准洗车", "全车精洗", "全车打蜡", "内饰清洗", "全车镀晶", "全车贴膜"] },
		  { typename: "保养门店", content: ["标准洗车", "全车精洗", "全车打蜡", "内饰清洗", "全车镀晶", "全车贴膜", "全车贴膜", "全车贴膜"] },
		  { typename: "安装门店", content: ["标准洗车", "全车精洗", "全车打蜡", "内饰清洗", "全车镀晶", "全车贴膜", "全车贴膜", "全车贴膜"] }
	  ]

  },
showDrop:function(e){
	this.setData({
		activeIndex:e.currentTarget.dataset.id
	})
},
	turnmenu:function(e){
		this.setData({
			serviceindex: e.currentTarget.dataset.index
		})
	},
	closeDrop:function(e){
		this.setData({
			activeIndex:-1
		})
	},
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
	//   var query = wx.createSelectorQuery();
	//   var that = this;
	//   query.select('.dropdown .service .left').boundingClientRect(function (e) {
	// 	  that.setData({
	// 		  rightheight: e.height + 'px'
	// 	  })
	//   }).exec();
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})